﻿using System.Collections.Generic;

namespace BlizzardApi.Model
{
    public enum ItemQuality
    {
        Poor = 0,
        Common = 1,
        Uncommon = 2,
        Rare = 3,
        Epic = 4,
        Legendary = 5,
        Artifact = 6,
    }

    public class Item
    {
        public int ID { get; set; }
        public IEnumerable<int> AllowableClasses { get; set; }
        public int BaseArmor { get; set; }
        public ItemBoundZone BoundZone { get; set; }
        public int BuyPrice { get; set; }
        public IEnumerable<ItemBonusStat> BonusStats { get; set; }
        public int ContainerSlots { get; set; }
        public string Description { get; set; }
        public int DisenchantingSkillRank { get; set; }
        public bool HasSockets { get; set; }
        public string Icon { get; set; }
        public int InventoryType { get; set; }
        public bool IsAuctionable { get; set; }
        public bool Equippable { get; set; }
        public int ItemBind { get; set; }
        public int ItemClass { get; set; }
        public int ItemLevel { get; set; }
        public ItemSource Source { get; set; }
        public int ItemSubClass { get; set; }
        public int MaxCount { get; set; }
        public int MaxDurability { get; set; }
        public int MinFactionID { get; set; }
        public int MinReputation { get; set; }
        public string Name { get; set; }
        public ItemQuality Quality { get; set; }
        public int RequiredLevel { get; set; }
        public int RequiredSkill { get; set; }
        public int RequiredSkillRank { get; set; }
        public int SellPrice { get; set; }
        public IEnumerable<ItemSpell> Spells { get; set; }
        public int Stackable { get; set; }
        public ItemWeaponInfo WeaponInfo { get; set; }
    }

    public class ItemWeaponInfo
    {
        public ItemWeaponInfoDamage Damage { get; set; }
        public float Dps { get; set; }
        public float WeaponSpeed { get; set; }
    }

    public class ItemBoundZone
    {
        public int ID { get; set; }
        public string Name { get; set; }
    }

    public class ItemWeaponInfoDamage
    {
        public int MinDamage { get; set; }
        public int MaxDamage { get; set; }
    }

    public class ItemBonusStat
    {
        public int Stat { get; set; }
        public int Amount { get; set; }
        public bool Reforged { get; set; }
    }

    public class ItemSource
    {
        public int SourceID { get; set; }
        public string SourceType { get; set; }
    }

    public class ItemSpell
    {
        public int CategoryID { get; set; }
        public int NCharges { get; set; }
        public ItemSpellDetails Sepll { get; set; }
        public bool Consumable { get; set; }
        public int SpellID { get; set; }
    }

    public class ItemSpellDetails
    {
        public string CastTime { get; set; }
        public string Description { get; set; }
        public string Icon { get; set; }
        public int ID { get; set; }
        public string Name { get; set; }
        public string Range { get; set; }
    }

    public enum ItemEquipType
    {
        Ammo = 0,
        Head = 1,
        Neck = 2,
        Shoulder = 3,
        Shirt = 4,
        Chest = 5,
        Waist = 6,
        Legs = 7,
        Feet = 8,
        Wrist = 9,
        Hands = 10,
        Finger = 11,
        Trinket = 12,
        OneHanded = 13,
        Bow = 15,
        Back = 16,
        TwoHanded = 17,
        Tabard = 19,
        Thrown = 25,
        Ranged = 26
    }
}
